<?php
$this->jQuery()->enable();
$this->headLink()->prependStylesheet('/js/jquery/css/themes/base/jquery.ui.all.css');
$this->headScript() ->appendFile('/js/jquery/jquery-ui-1.8.12.custom.min.js')
					->appendFile('/js/jquery/ui/jquery.ui.widget.js')
					->appendFile('/js/jquery/ui/jquery.ui.core.js')					
					->appendFile('/js/jquery/ui/jquery.ui.dialog.js')					
					->appendFile('/js/jquery/ui/jquery.ui.draggable.js')
					->appendFile('/js/jquery/ui/jquery.ui.position.js')
					->appendFile('/js/jquery/ui/jquery.ui.resizable.js')
					->appendFile('/js/jquery/ui/jquery.ui.mouse.js')
					->appendFile('/js/jquery/ui/jquery.ui.button.js')					
					->appendFile('/js/geralAjax.js');
					

$this->headScript()->appendScript("
$(document).ready(function(){
 $('#confirme').dialog({
        height: 140,
        autoOpen: false,
        modal: true,
        resizable: false});
        $('input#Cadastrar').button();               
      
});");
$translator = Zend_Registry::get('translator');
?>
<div id="flash-messeger"><?php echo $this->flashMessenger(); ?></div>
<div id="mapa">Configurações de Base/<span>Filtros</span></div>
<?php 
echo $this->form;
?>

<table class="grid">
	<thead>
		<tr>
			<th><?php echo $translator->_('FILTRO');?></th>
			<th><?php echo $translator->_('LISTA');?></th>
			<th><?php echo $translator->_('ACOES');?></th>
		</tr>
	</thead>
	<tbody>
       <?php foreach ($this->listaFiltroPaginacao as $filtro) :?>
        <tr>
			<td><?php echo $filtro['nome'];?></td>
			<td><?php echo $filtro['nomeLista'];?></td>
			<td class="opcoes" width="10%">
				<a title="<?php echo $translator->_('EDITAR');?>" href="<?php echo $this->url(array('action' => 'edit','controller' => 'filtro','module' => 'admin','id' => $filtro['idfiltro']));?>"><img border="0" src="/imagens/icons/funnel-pencil-icon.png"></a> |
				<a title="<?php echo $translator->_('EXCLUIR');?>" href="javascript:void(0);" onclick="poup('/admin/filtro/excluir-filtro/id/',<?php echo $filtro['idfiltro'];?>);"><img border="0" src="/imagens/icons/funnel-minus-icon.png"></a>
			</td>
		</tr>
        <?php endforeach;?>
        <tr>
        <td colspan="3"><div align="right" style="font-size: 70%;"><strong><?php echo $translator->_('LEGENDA');?>:</strong>&nbsp&nbsp<img border="0" src="/imagens/icons/funnel-pencil-icon.png"> <?php echo $translator->_('EDITAR');?> | <img border="0" src="/imagens/icons/funnel-minus-icon.png"> <?php echo $translator->_('EXCLUIR');?> </div></td>
        </tr>
    </tbody>
</table>
<?php echo $this->paginationControl($this->listaFiltroPaginacao, 'Sliding', 'paginacao.phtml');?>
<div id="confirme" title="<?php echo $translator->_('EXCLUIR_FILTRO');?>">
	<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span><?php echo $translator->_('DELETAR_FILTRO');?></p>
</div>